// 手机号校验
const validatorPhone = (val: string) => {
  return /^1[3|4|5|6|7|8|9][0-9]\d{8}$/.test(val)
}

// 密码校验
const validatorPwd = (val: string) => {
  if (val.length > 20) {
    return '密码长度不能大于20'
  } else if (val.length < 10) {
    return '密码长度不能小于10'
  }
  return true
}

// 密码一致性校验
const validatorRePwd = (val: string, password: string) => {
  return val === password
}

export {
  validatorPhone,
  validatorRePwd,
  validatorPwd
}